package spring.security.core.lock;

import spring.security.core.lock.annotation.SyncLock;

public class SyncLockConf {
	private String key;
	private long timeout = 60000L;
	private boolean failfast = true;
	private long obtainTimeout = 90000L;

	public SyncLockConf(SyncLock syncLock) {
		this.key = syncLock.key();
		this.failfast = syncLock.failfast();
		this.timeout = syncLock.timeout();
		this.obtainTimeout = syncLock.obtainTimeout();
	}

	public String getKey() {
		return this.key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public long getTimeout() {
		return this.timeout;
	}

	public void setTimeout(long timeout) {
		this.timeout = timeout;
	}

	public boolean isFailfast() {
		return this.failfast;
	}

	public void setFailfast(boolean failfast) {
		this.failfast = failfast;
	}

	public long getObtainTimeout() {
		return this.obtainTimeout;
	}

	public void setObtainTimeout(long obtainTimeout) {
		this.obtainTimeout = obtainTimeout;
	}
}
